cmake_minimum_required(VERSION 3.00)

project(netdata)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)

set(SYSTEM_CPU_COMPILER "${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}_${CMAKE_C_COMPILER_ID}")
string(TOLOWER "${SYSTEM_CPU_COMPILER}" SYSTEM_CPU_COMPILER)
message("SYSTEM_CPU_COMPILER: ${SYSTEM_CPU_COMPILER}")

SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -fPIC")

file(GLOB_RECURSE APP_SRCS "*.c")

add_library(${PROJECT_NAME}_${SYSTEM_CPU_COMPILER} ${APP_SRCS})

